<%@ page import="com.atguigu.bean.User" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

    <%
        User user = new User(1001,"admin","123");
        //session.setAttribute("user",user);
    %>
    <c:if test="${not empty sessionScope.user}" var="flag">
        欢迎，${sessionScope.user.username}
    </c:if>
    <c:if test="${!pageScope.flag}">
        <a href="">登录</a>
        <a href="">注册</a>
    </c:if>
    <c:if test="${empty sessionScope.user}">
        <a href="">登录</a>
        <a href="">注册</a>
    </c:if>

</body>
</html>
